#include <iostream>
using namespace std;
int main()
{int n,i=0,j=0,k=0;
 for (n=100;n<=999;n++)
   {k=n%10;
    j=(n/10)%10;
    i=n/100;
    if (n==i*i*i+j*j*j+k*k*k)
      cout<<n<<endl;
    }
   system ("pause");
   return 0;
}
